module.exports = class extends think.Model {
    async wapPay (SDK, data) {
        data.productCode = 'QUICK_WAP_WAY'
        const AlipayFormData = require('alipay-sdk/lib/form').default
        let formData = new AlipayFormData();
        formData.setMethod('get'); // 设置 get 方式 请求返回的就是一个 支付页面链接
        formData.addField('notifyUrl', data.notifyUrl) // 添加支付核验接口
        formData.addField('bizContent', think.omit(data, 'notifyUrl'));
        let result = await SDK.exec('alipay.trade.wap.pay', {}, { formData: formData });
        return result
    }
    /// 发起用户提现
    async cash (SDK, data) {
        const result = await SDK.exec('alipay.fund.trans.uni.transfer', {
            // 通过 bizContent 传递请求参数
            bizContent: data
        });
        return result
    }
};
